#!/usr/bin/env python2.5
# encoding: utf-8

if not globals().has_key("esda"):
    execfile("esda.py")
    sys.exit()

init()

import random

name = "Stream"

newStream(name)

for j in range(10):
    streams[name][100*j+1:100*j+80] = random.random()

def endTimeFilterForStream(startTime, endTime, value):
    return endTime + 50

def endTime2(startTime, endTime, value):
    return endTime + 20

newFilterStream(
    "ExpandedStream", "Stream",
    endTimeFilter=endTimeFilterForStream)

newFilterStream(
    "NormalizedExpansion", "Stream",
    endTimeFilter=endTime2)

